import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const baseUrl = Vue.prototype.$itsoftUI.config.serviceUrl + "/repair"

//录单api
export const myRepairApi = {
    //.我的报修查询
    MyList: function (pageNum, pageSize) {
        const data = {
            pageNum,
            pageSize
        }
        return request({
            url: baseUrl + '/myRepair/myList',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    //.详情
    Get: function (id) {
        const data = {
            id
        }
        return request({
            url: baseUrl + '/myRepair/get',
            method: 'post',
            data: qs.stringify(data)
        })
    },

    Save: function (data) {
        const config = {
            headers: {
                'Content-Type': 'application/json;charset=utf-8'
            },
        }
        return request.post(baseUrl + "/publish/publish", data, config)
    }
}